-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add architecture support #13239
Merged
chrisroberts
merged 11 commits into
hashicorp:main
from
chrisroberts:architecture-aware
Sep 27, 2023
Merged
Add architecture support #13239
chrisroberts
merged 11 commits into
hashicorp:main
from
chrisroberts:architecture-aware
Sep 27, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vancluever
previously approved these changes
Jul 28, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! 🎉
chrisroberts
force-pushed
the
architecture-aware
branch
from
July 28, 2023 23:51
cc7b863
to
95989bf
Compare
chrisroberts
force-pushed
the
architecture-aware
branch
from
July 29, 2023 00:19
95989bf
to
cefb7db
Compare
Introduce support for handling box architecture. Adds a new `box_architecture` setting that defaults to `:auto` which will perform automatic detection of the host system, but can be overridden with a custom value. Can also be set to `nil` which will result in it fetching the box flagged with the default architecture within the metadata. Box collection has been modified to allow existing boxes already downloaded and unpacked to still function as expected when architecture information is not available.
When expanding the box url, prefer the API endpoint which is updated to include provider architecture information. Test the API endpoint and the legacy endpoint and use which ever is valid, with the API taking precedence. This allows Vagrant to continue with non Vagrant Cloud servers that do not implement the API endpoint.
chrisroberts
force-pushed
the
architecture-aware
branch
from
September 16, 2023 00:35
cefb7db
to
9ef5c49
Compare
With the initial layout of `provider/architecture`, after installing a box with architecture support downgrading Vagrant would result in it being unable to process the box collection. Swapping the layout to be `architecture/provider` allows downgrades to still properly process the box collection.
chrisroberts
force-pushed
the
architecture-aware
branch
from
September 25, 2023 22:09
e6941b8
to
e719113
Compare
When the reported architecture is unknown and the provider is listed as the default architecture, add the box without architecture information so it is installed without architecture information on the path within the collection.
Great! Thank you! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds box architecture support. It introduces a new setting to
the vm configuration within the Vagrantfile:
In most circumstances, this setting will not be needed. By default it
is set to a special value of
:auto
. The behavior when set to:auto
isas follows: Vagrant will determine the architecture of the host and automatically
request it from the box repository. If architecture information is available in
the repository metadata and a matching architecture was not found, Vagrant will
look for a box with an architecture of "unknown" and flagged as the default
architecture. This behavior allows Vagrant to continue working correctly with
boxes currently published on Vagrant Cloud that do not include architecture
information.
The
box_architecture
setting can also be set tonil
, which will preventany architecture filtering being performed, and the box flagged as the default
architecture will be used.
The box collection will now unpack boxes based on architecture. Special handling
is done when
box_architecture
is set to:auto
which prevents Vagrant fromnot properly detecting boxes installed without architecture support.
The
vagrant cloud
commands have been updated to include architecture supportwhere required. These updates are dependent on hashicorp/vagrant_cloud#82
Fixes: #12610